#ifndef CAMERA_H
#define CAMERA_H

#include <d3d9.h>
#include <d3dx9.h>
#include <windows.h>

#define CAMERA_WIDTH 256
#define CAMERA_HEIGHT 240

class CCamera
{

private:
	float m_posX;
	float m_posY;
	float m_heigth;
	float m_width;

	RECT m_view;
	D3DXMATRIX MatrixTransform;
	D3DXMATRIX m_viewPort;


public:
	CCamera();
	CCamera(float posX, float posY);
	CCamera(float posX,float posY,float width,float heigth);



	float getPosX(){ return m_posX; }
	void setPosX(float x){ m_posX = x; }

	float getPosY(){ return m_posY; }
	void setPosY(float x){ m_posY = x; }

	float getWidth(){ return m_width; }
	void setWidth(float x){  m_width = x; }

	float getHeigth(){ return m_heigth; }
	void setHeigth(float x) { m_heigth = x; }

	
	RECT getRect(){ return m_view; }

	D3DXVECTOR2 getPointTransform(float x, float y);
	D3DXMATRIX getViewPort();
	void update(float time, D3DXVECTOR2 pos);
	void setPostion(float posX, float posY);

	~CCamera();



};


#endif